<template>
  <div v-if="srcList.length > 0">
    <video
      v-for="name in srcList"
      :src="name"
      :key="name"
      type="video/mp4"
      width="320"
      height="240"
      controls
    ></video>
  </div>
</template>

<script>
import { fileFormat } from "@/util/upload";

export default {
  name: "SVideo",
  props: {
    data: {
      type: String,
    }
  },
  data() {
    return {
      srcList: this.data ? fileFormat(this.data) : []
    };
  }
};
</script>
